// 这里没有解决跨域问题，但可以通过后解决跨域问题在后端的Controller层使用@CrossOrigin
import request from '../utils/request'

export function getImportGoodsList(importId) {
  return request({
    url: '/importGoods',
    method: 'get',
    params: {
      importId
    }
  })
}

export function addImportGoods(importId,importGoods) {
  return request({
    url: '/importGoods',
    method: 'post',
    data: {
      importId:importId,
      importGoods:JSON.stringify(importGoods)
    }
  })
}

export function findImportGoodsFour(import_id, inside_id, factory_id, username) {
  return request({
    url: '/importGoods/find/four',
    method: 'post',
    params: {
      import_id: import_id,
      inside_id: inside_id,
      factory_id: factory_id,
      username: username
    }
  })
}

export function deleteImportGoods(import_id) {
  return request({
    url: '/importGoods/delete',
    method: 'post',
    params: {
      import_id: import_id
    }
  })
}


